package com.zm.api.openFeign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Component("productFeign")          //服务名
@FeignClient(value = "product-server")
public interface ProductFeign {
    @RequestMapping("/db/{id}")
    public Boolean reduceStock(@PathVariable("id") Long id);

    @RequestMapping("/dbTCC/{id}")
    public Boolean reduceStockTCC(@PathVariable("id") Long id);
}
